package com.pkk.spring.cloud.gateway.runner.ping;

import cn.hutool.core.util.StrUtil;
import com.pkk.spring.cloud.service.rpc.response.ResponseBody;
import com.pkk.spring.cloud.service.rpc.result.R;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试
 *
 * @author peikunkun
 * @version V1.0
 * @date 2021-01-20 12:02
 **/
@RestController
@RequestMapping
public class PingController {


  @RequestMapping("ping/{message}")
  public ResponseBody ping(@PathVariable("message") String message) {
    if (StrUtil.isBlank(message)) {
      return R.success("pang");
    }
    return R.success(message);
  }


}
